Skip to content

Add top level attributes and commands to simplify API#82

Open
GDYendell wants to merge 1 commit intomainfrom
top-level-attributes
Open

Add top level attributes and commands to simplify API#82
GDYendell wants to merge 1 commit intomainfrom
top-level-attributes

Conversation

@GDYendell
Copy link
Contributor

@GDYendell GDYendell commented Dec 5, 2025

@GDYendell GDYendell requested a review from shihab-dls December 5, 2025 18:45
@GDYendell GDYendell linked an issue Jan 8, 2026 that may be closed by this pull request
@GDYendell GDYendell force-pushed the top-level-attributes branch 2 times, most recently from 91267b2 to 68b31e4 Compare January 14, 2026 09:26
@GDYendell GDYendell force-pushed the top-level-attributes branch from 68b31e4 to 1979b0c Compare January 14, 2026 09:30
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 61.81818% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.00%. Comparing base (1620928) to head (1979b0c).

Files with missing lines Patch % Lines
...cs_eiger/controllers/odin/eiger_odin_controller.py 31.25% 11 Missing ⚠️
...c/fastcs_eiger/controllers/odin/odin_controller.py 70.58% 5 Missing ⚠️
src/fastcs_eiger/__main__.py 0.00% 3 Missing ⚠️
src/fastcs_eiger/controllers/eiger_controller.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
- Coverage   84.86%   82.00%   -2.87%     
==========================================
  Files          13       14       +1     
  Lines         403      450      +47     
==========================================
+ Hits          342      369      +27     
- Misses         61       81      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@shihab-dls shihab-dls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Left a couple of comments that are just enquiries; Will request changes just so that you can rerequest a review when codecov is satisfied.

TimeoutError: If parameters are not synchronised or arm PUT request fails

"""
await self.stale_parameters.wait_for_value(False, timeout=1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could: Now that we have wait_for_value with a timeout should we expose a DEFAULT_TIMEOUT in FastCS, such that we can ensure observation timeouts are consistent unless they explicitly shouldn't be?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure there is a widely useful default - what else would you use that default for?

I am actually not sure if 1 second here is sufficient. Perhaps it should be an Attribute so it can be changed at runtime?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair; ophyd_async has a DEFAULT_TIMEOUT of 10s, which is used in lots of places. In this case, since wait_for_value is the only place we'd really use a default timeout, maybe just a default argument in:

    async def wait_for_value(self, target_value: DType_T, *, timeout: float):

for timeout?

Making it an attribute is interesting, but I feel as though users would just want a long enough timeout to realistically prompt the "is there something wrong with the ioc/device" question, similar to how timing out on an ophyd_async signal.set() prompts a similar question. So, I would lean towards the default argument in FastCS, but I'm happy with either approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add attribute fan outs to reduce puts required for an acquisition

2 participants